﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TeacherHelp.DAL
{
    public class TeacherLinkGradeService
    {
        public string GetCountSQL() {
            string sql = " select count(0) from TeacherLinkGrade ";
            return sql;
        }

        public string DeleteTeacherLinkGradeByUserIdSQL(int userId) {
            string sql = $"delete from TeacherLinkGrade where UserId = " + userId;
            return sql;
        }

        public string GetAllStudentIdByTeacherId(int teacherId)
        {
            string sql = $@"
            select distinct 
                    UserId 
            from TeacherLinkGrade 
            where UserId not in 
            (select GradeId from TeacherLinkGrade where UserId = {teacherId})";
            return sql;
        }
    }
}
